⏳ algorithm ver.2